#include <iostream>
using namespace std;

int main() {
    int k;
    int kv[46];
    int value = 1;
    cin >> k;
    if (k < 1 || k > 46)
    {
        return 0;
    }
    
    for (int i = 0; i < k; i++)
    {
        if (i <= 1)
        {
            value = 1;
        } else {
            value = kv[i-1] + kv[i-2];
        }
        kv[i] = value;
        //cout << i << "=" << kv[i] << " ";
    }
    cout << kv[k-1];
    
    return 0;
}